package com.lcy.util;


import com.lcy.bean.PageB;
import org.apache.flink.configuration.Configuration;
import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;
import redis.clients.jedis.Jedis;

public class FlinkToRedis extends RichSinkFunction<PageB> {
    @Override
    public void open(Configuration parameters) throws Exception {

    }
    @Override
    public void invoke(PageB value, Context context) throws Exception {
        Jedis jedis = new Jedis("hadoop-single",6379);
        jedis.set(value.getPage_id(),value.toString());

    }



}
